package bishiqiangxun;
import java.util.*;
public class Test1 {
    //题目: 乒乓球筐
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        //用哈希表 统计每个字母出现的次数
        String str1 = in.next();
        String str2 = in.next();
        char[] ch1 = str1.toCharArray();
        char[] ch2 = str2.toCharArray();
        //创建两个哈希表
        Map<Character,Integer> map1 = new HashMap<>();
        Map<Character,Integer> map2 = new HashMap<>();

        for(char c1 : ch1) {
            if(map1.containsKey(c1)) {
                map1.put(c1,map1.get(c1) + 1);
            } else {
                map1.put(c1,1);
            }
        }

        for(char c2 : ch2) {
            if(map2.containsKey(c2)) {
                map2.put(c2,map2.get(c2) + 1);
            }else{
                map2.put(c2,1);
            }
        }

        //定义一个记录长度的变量
        int len = 0;
        for(int i = 0; i < ch2.length; i++) {
            if(!map1.containsKey(ch2[i])) {
                //不包含  直接返回  No
                System.out.println("No");
                break;
            }else{
                map1.put(ch2[i],map1.get(ch2[i]) -1);
                if(map1.get(ch2[i]) < 0) {
                    System.out.println("No");
                    break;
                }
                len++;
            }

        }
        //判断长度
        if(len == ch2.length) {
            System.out.println("Yes");
        }

    }
}
